//
//  JPhotoView.h
//  JPhotoBrowser_Example
//
//  Created by 计海峰 on 2017/11/16.
//  Copyright © 2017年 jhfappkf@163.com. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "JProgressLayer.h"
#import "JSDImageManager.h"

#import <FLAnimatedImage/FLAnimatedImageView.h>

NS_ASSUME_NONNULL_BEGIN  //两个宏之间的代码，所有简单指针对象都被假定为nonnull

@protocol KSImageManager;
@class JPhotoItem;

typedef void(^JPhotoViewActivity)(NSInteger idx, JPhotoItem *videoUrl);

extern const CGFloat kJPhotoViewPadding;

@interface JPhotoView : UIScrollView

@property (nonatomic, strong, readonly) FLAnimatedImageView *imageView;
@property (nonatomic, strong, readonly) JProgressLayer *progressLayer;
@property (nonatomic, strong, readonly) JPhotoItem *item;

@property (nonatomic, copy) JPhotoViewActivity activity;

- (instancetype)initWithFrame:(CGRect)frame imageManager:(JSDImageManager *)imageManager ;
- (void)setItem:(JPhotoItem *)item determinate:(BOOL)determinate;
- (void)resizeImageView;
- (void)cancelCurrentImageLoad;

- (void)hiddenClose;
- (void)showClose;

@end

NS_ASSUME_NONNULL_END
